package com.ek.distmpl.dao.mapper;

import com.ek.distmpl.dao.model.Viporder;
import com.ek.distmpl.dao.model.ViporderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface ViporderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ViporderSqlProvider.class, method="countByExample")
    long countByExample(ViporderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @DeleteProvider(type=ViporderSqlProvider.class, method="deleteByExample")
    int deleteByExample(ViporderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Delete({
        "delete from viporder",
        "where vip_order_void = #{vipOrderVoid,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(String vipOrderVoid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Insert({
        "insert into viporder (vip_order_void, vip_order_vid, ",
        "vip_order_uid, order_total_num, ",
        "order_create_time, order_pay_time, ",
        "vip_order_status)",
        "values (#{vipOrderVoid,jdbcType=CHAR}, #{vipOrderVid,jdbcType=CHAR}, ",
        "#{vipOrderUid,jdbcType=CHAR}, #{orderTotalNum,jdbcType=INTEGER}, ",
        "#{orderCreateTime,jdbcType=VARCHAR}, #{orderPayTime,jdbcType=VARCHAR}, ",
        "#{vipOrderStatus,jdbcType=INTEGER})"
    })
    int insert(Viporder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @InsertProvider(type=ViporderSqlProvider.class, method="insertSelective")
    int insertSelective(Viporder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ViporderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="vip_order_void", property="vipOrderVoid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="vip_order_vid", property="vipOrderVid", jdbcType=JdbcType.CHAR),
        @Result(column="vip_order_uid", property="vipOrderUid", jdbcType=JdbcType.CHAR),
        @Result(column="order_total_num", property="orderTotalNum", jdbcType=JdbcType.INTEGER),
        @Result(column="order_create_time", property="orderCreateTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_pay_time", property="orderPayTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="vip_order_status", property="vipOrderStatus", jdbcType=JdbcType.INTEGER)
    })
    List<Viporder> selectByExample(ViporderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Select({
        "select",
        "vip_order_void, vip_order_vid, vip_order_uid, order_total_num, order_create_time, ",
        "order_pay_time, vip_order_status",
        "from viporder",
        "where vip_order_void = #{vipOrderVoid,jdbcType=CHAR}"
    })
    @Results({
        @Result(column="vip_order_void", property="vipOrderVoid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="vip_order_vid", property="vipOrderVid", jdbcType=JdbcType.CHAR),
        @Result(column="vip_order_uid", property="vipOrderUid", jdbcType=JdbcType.CHAR),
        @Result(column="order_total_num", property="orderTotalNum", jdbcType=JdbcType.INTEGER),
        @Result(column="order_create_time", property="orderCreateTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_pay_time", property="orderPayTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="vip_order_status", property="vipOrderStatus", jdbcType=JdbcType.INTEGER)
    })
    Viporder selectByPrimaryKey(String vipOrderVoid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ViporderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Viporder record, @Param("example") ViporderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ViporderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Viporder record, @Param("example") ViporderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ViporderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Viporder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table viporder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update viporder",
        "set vip_order_vid = #{vipOrderVid,jdbcType=CHAR},",
          "vip_order_uid = #{vipOrderUid,jdbcType=CHAR},",
          "order_total_num = #{orderTotalNum,jdbcType=INTEGER},",
          "order_create_time = #{orderCreateTime,jdbcType=VARCHAR},",
          "order_pay_time = #{orderPayTime,jdbcType=VARCHAR},",
          "vip_order_status = #{vipOrderStatus,jdbcType=INTEGER}",
        "where vip_order_void = #{vipOrderVoid,jdbcType=CHAR}"
    })
    int updateByPrimaryKey(Viporder record);
}